import request from '@/utils/request'

// 查询仓库SKU编码列表
export function listWarecode(query) {
  return request({
    url: '/goods/warecode/list',
    method: 'post',
    data: query
  })
}

// 查询仓库SKU编码列表用于修改
export function listWarecodeForUpdate(query) {
  return request({
    url: '/goods/warecode/listForUpdate',
    method: 'post',
    data: query
  })
}

// 查询仓库SKU编码详细
export function getWarecode(id) {
  return request({
    url: '/goods/warecode/' + id,
    method: 'get'
  })
}

// 新增仓库SKU编码
export function addWarecode(data) {
  return request({
    url: '/goods/warecode/add',
    method: 'post',
    data: data
  })
}

// 修改仓库SKU编码
export function updateWarecode(data) {
  return request({
    url: '/goods/warecode/update',
    method: 'post',
    data: data
  })
}

// 删除仓库SKU编码
export function delWarecode(id) {
  return request({
    url: '/goods/warecode/delete/' + id,
    method: 'post'
  })
}


// 删除仓库SKU编码
export function updateWareSellSpec(data) {
  return request({
    url: '/goods/warecode/updateWareSellSpec',
    method: 'post',
    data: data
  })
}